<template>
  <div>
      <el-menu router :default-active="$route.path" uniqueOpened>
        <recursive-menu :children="routesForNav.children"></recursive-menu>
      </el-menu>
  </div>
</template>

<script>

import RecursiveMenu from "@/components/RecursiveMenu";

export default {
  name: "InfiniteNav",
  components: {
    RecursiveMenu
    // New,Old,
  },
  props: {
    sampleP: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {
      sampleD: "value",
    };
  },
  //页面变量 页面属性的类型 根据data/prop计算出来的属性 简称计算属性
  computed: {

     // ...mapState(['routesForNav'])

    routesForNav(){
      return this.$store.state.routesForNav;
    }
    // sampleC() {
    //     return this.sampleD+'--';
    // }
  },
  created() {},
  mounted() {},
  methods: {
    sampleM() {},
  },
  watch: {
    // sampleC(newValue, oldValue) {
    //
    // }
  },
};
</script>

<!--<style scoped>-->
<style lang="scss" scoped></style>
